package cn.tedu;

import cn.tedu.ba01.Student;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Date;

public class Mytest {

    @Test
    public void test01(){
        String config="ba01/applicationContext.xml";
        ApplicationContext ac=new ClassPathXmlApplicationContext(config);
        Student myStudent = (Student) ac.getBean("myStudent");
        System.out.println(myStudent);
        Date mydate = (Date) ac.getBean("Mydate");
        System.out.println("dateTime:"+mydate);
    }
}
